<!DOCTYPE html>
<html lang="zh">

	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<meta http-equiv="X-UA-Compatible" content="ie=edge" />
		<title>Document</title>
		<style type="text/css">
			body {
				background-color: dodgerblue;
			}
			
			.posDir {
				margin: 100px auto;
				width: 100px;
				height: 100px;
				border: 1px solid #ccc;
			}
			
			.linearBar {
				background-image: linear-gradient(45deg, #000, #fff);
				/*偏向角度,起始点颜色,终止点颜色*/
			}
			
			.linearBar2 {
				background-image: linear-gradient(to left bottom, #000, #fff);
			}
			
			.linearBar3 {
				background-image: linear-gradient(40deg, #99CC33, #FF6666, #336699, #FF0033);
			}
			
			.linearBar4 {
				background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
				background-color: #33CC99;
			}
			
			.progress {
				margin: 100px auto;
				width: 80%;
				box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
				border-radius: 4px;
				height: 20px;
				overflow: hidden;
				background-color: #f5f5f5;
			}
			
			.progress-bar {
				float: left;
				width: 0;
				height: 100%;
				line-height: 20px;
				color: #fff;
				text-align: center;
				background-color: #5cb85c;
				box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
			}
			
			.progress-bar-striped {
				width: 100px;
				height: 100px;
				border: 1px solid #ccc;
				background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
				background-size: 40px 40px;
			}
		</style>
	</head>

	<body>
		<div class="linearBar posDir"></div>
		<div class="linearBar2 posDir"></div>
		<div class="linearBar3 posDir"></div>
		<div class="linearBar4 posDir"></div>
		<div class="progress">
			<div class="progress-bar progress-bar-striped" style="width:60%">60%</div>
		</div>
	</body>

</html>